Concurrent computing is a form of computing in which several computations are executed during overlapping time periods, i.e., concurrently, rather than sequentially (one completing before the next one starts). Thus, concurrent computing can be considered a property of a system (the system can be, for example, a hardware processor, a software program, a computer, or a network) whereby there is a separate execution point or “thread” of control for each computation (process). Thus, a concurrent system is one where a computation can make progress without waiting for all other computations to complete, i.e., where more than one computation can make progress at the same time.
A main challenge in designing concurrent systems is the concept of concurrency control. Concurrency control in a concurrent system ensures the correct sequencing of the interactions or communications between different computational executions, and coordinates access to resources that are shared among executions.
One approach to concurrency control utilizes a locking mechanism (one or more locks) to guarantee that threads have exclusive access to shared data for a critical section of code execution. Typically, a thread acquires the lock, executes its critical section of code, and releases the lock. This approach is considered a pessimistic concurrency control approach.
A more recent approach to concurrency control in the context of multi-threaded, multi-core hardware processors is the use of a “hardware transactional memory.” Hardware transactional memory attempts to simplify concurrent programming by allowing a group of load and store instructions to execute in an atomic way (i.e., guarantee of isolation from concurrent processes). This approach is considered an optimistic concurrency control approach.